message("Using MinGW GCC")

set(MINGW True)

set(EXTRA_COMPILE_FLAGS_MINSIZEREL "${EXTRA_COMPILE_FLAGS_MINSIZEREL} -DMINGW=1")
set(EXTRA_COMPILE_FLAGS_DEBUG "${EXTRA_COMPILE_FLAGS_DEBUG} -DMINGW=1")

# MinGW set up seems to not do this automatically?
include_directories(${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES})

# message("CMAKE_FIND_ROOT_PATH = ${CMAKE_FIND_ROOT_PATH}")

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)

# get defaults for GCC
include("${CMAKE_SOURCE_DIR}/cmake_toolchains/clang_or_gcc.cmake")

# message("CMAKE_C_COMPILER = ${CMAKE_C_COMPILER}")
# message("CMAKE_CXX_COMPILER = ${CMAKE_CXX_COMPILER}")
# message("CMAKE_MAKE_PROGRAM = ${CMAKE_MAKE_PROGRAM}")
